package com.mydb.util;

import java.io.IOException;
import java.util.Properties;

public class PropertiesUtil {

	public String getProperty(String name) {
		String value = null;
		try {
			Properties p = new Properties();
			p.load(this.getClass().getResourceAsStream("/mydb.properties"));
			value = p.getProperty(name);
		} catch (IOException e) {
			e.printStackTrace();
		}
		return value;
	}
	
	public static void main(String[] args) {
		PropertiesUtil pu = new PropertiesUtil();
		System.out.println(pu.getProperty("database.path"));

	}

}
